package com.jswl.ssm.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.jswl.ssm.entity.User;
import com.jswl.ssm.service.UserService;

@RestController
@RequestMapping("/user")
public class UserController {

	@Autowired
	private UserService userSerivce;
	
	@GetMapping("/info/{id}")
	public User getUserInfo(@PathVariable("id")Integer id) {
		return userSerivce.findUserById(id);
	}
}
